﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Maticsoft.Common
{
    public class Singleton
    {
        private static volatile Singleton instance = null;

        private static readonly object syncRoot = new object();

        private Singleton() { }

        public static Singleton Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (syncRoot)
                    {
                        if (instance == null)
                        {
                            instance = new Singleton();
                        }
                    }
                }
                return instance;
            }
        }

        public bool Iscan()
        {
            lock (syncRoot)
            {
                return true;
            }
        }
    }
}
